using System;
using System.Collections.Generic;
using System.Text;

namespace FTPAppCHash
{
    class Program
    {
        static void Main(string[] args)
        {
            System.String fileName = String.Concat(System.IO.Path.GetTempPath(), "ftpappscript.script");
            System.Console.WriteLine(fileName);

            /*FileInfo file(fileName);
            StreamWriter ^Tex = file.CreateText();
            Tex->WriteLine("open ftp.daedalus-development.net");
            Tex->WriteLine("u39689481");
            Tex->WriteLine("wars9550");
            Tex->Write("put ");
            Tex->Write(args[0]);
            Tex->WriteLine(" /personal/ricka/transfer/");
            Tex->WriteLine("quit");
            Tex->Close();*/

            System.Net.FtpWebRequest ftp = (System.Net.FtpWebRequest)System.Net.WebRequest.Create("ftp://ftp.daedalus-development.net");
            
        }
    }
}

/*
using System;
using System.Text;
using System.IO;
using System.Net;
using System.Collections;

namespace ImageFTPService
{


	class Program
	{
		private const string directory = @"";
		private const string server = @"";
		private const string username = @"";
		private const string password = @"";
		private const string log_path_success = @"C:\logs\success.log";
		private const string log_path_fail = @"C:\logs\fail.log";
		private static int errCount = 0;
		static void Main(string[] args)
		{
			DirectoryInfo dir = new DirectoryInfo(directory);
			FileInfo[] infos = dir.GetFiles("*.*");
			bool IsSuccess = true;

			foreach (FileInfo fileInfo in infos)
			{
				if (null != fileInfo)
				{
					IsSuccess = UploadFile(fileInfo);
					if (!IsSuccess)
					{
						errCount = errCount + 1;
						if (errCount > 100)
							break;
					}
				}
			}
			Console.WriteLine("Waiting...");
			Console.Read();
		}

		static bool UploadFile(FileInfo fileInfo)
		{
			bool IsSuccess = true;
			NetworkCredential credentials = new NetworkCredential(username, password);
			string serverAddress = "ftp://" + server + "/Images/";
			FtpWebRequest request = null;
			FtpWebResponse response = null;
			FileStream fr = null;
			try
			{
				request = (FtpWebRequest)FtpWebRequest.Create(new Uri(serverAddress + fileInfo.Name));
			}

			catch (Exception ex)
			{
				using (StreamWriter sw3 = File.AppendText(log_path_fail))
				{
					sw3.WriteLine(fileInfo.Name);
					sw3.WriteLine("-{0}", ex.Message);
				}
				Console.WriteLine("Fail: {0}", fileInfo.Name);
				Console.WriteLine("-{0}", ex.Message);

				return false;

			}
			try
			{
				request.Method = WebRequestMethods.Ftp.UploadFile;
				request.Credentials = credentials;
				request.UseBinary = true;
				//read the image into a byte array using a FileStream
				byte[] fileContents = new byte[fileInfo.Length];
				fr = fileInfo.OpenRead();
				fr.Read(fileContents, 0, Convert.ToInt32(fileInfo.Length));
				fr.Close();
				//get the FTP upload stream
				Stream requestStream = request.GetRequestStream();
				//write the btye array to the stream
				requestStream.Write(fileContents, 0, fileContents.Length);
				requestStream.Close();
				response = (FtpWebResponse)request.GetResponse();
				using (StreamWriter sw0 = File.AppendText(log_path_success))
				{
					sw0.WriteLine(fileInfo.Name);
				}
				Console.WriteLine("Success: {0}", fileInfo.Name);
				response.Close();
			}
			catch (Exception e)
			{
				using (StreamWriter sw2 = File.AppendText(log_path_fail))
				{
					sw2.WriteLine(fileInfo.Name);
					sw2.WriteLine("-{0}", e.Message);
				}
				Console.WriteLine("Fail: {0}", fileInfo.Name);
				Console.WriteLine("-{0}", e.Message);
				IsSuccess = false;
			}
			System.Threading.Thread.Sleep(5000);
			return IsSuccess;
		}
	}
}
*/